Repository navigation
web-regions: inner scroll regions, dialog focus, comment width, v0.4.0 - #11
Merged
Merged
Conversation
- mise.toml: pnpm 12.23.0 -> 12.25.1. - package.json: globals 17.14.0 -> 17.15.0; lockfile regenerated under pnpm 12.25.1, which passes its supply-chain policies. - The web-foundation pin stays at v0.4.0; currency reports it current. - CHANGELOG opens an Unreleased section for the bumps, as 6084f9f did after 0.2.0.
sl-pagination, sl-document-list, and sl-search-results are flex columns of min-block-size: 0 whose list is the one scrolling region (flex: 1 1 auto; min-block-size: 0; overflow: auto). Held by a size on the host or a sized flex or grid parent, the list scrolls while the summary, the status line, and the pagination's controls stay in view; unheld, each is as tall as its content. The host doesn't grow to fill: a consumer's .scroll-frame or flex sizing does that, and in a row parent a grow would widen it. Decisions: - The scroller clips a focused button's outline, so the region's padding and scroll padding are --focus-reach, and the summary, status, and controls' rows take the same inline padding, so their text starts at the list's button edge. The controls' rule still spans the host. - sl-pagination gains a `before` slot, a row between the summary and the page, outside the scroll. sl-document-list puts its own-line status (no summary to join, or error) there, so it stays in view. - The specimen pages' narrow section is 390px (the narrow case at text 100%) in place of 20rem; tests and captions follow. Component width-range cases (20rem/40rem, the entry's 16rem floor, the drawer's dock) stay. Three specimens whose narrow assertions needed content to wrap at 320px got longer content: an entry with a long content type, a UUID run id in run.json, and a longer function name in the chat thread. Nothing overflowed its container at 390px. - The probe's content-type case skips wbr, which has no box and sat at the viewport origin. Tests: a held-host measure (test/browser/support/held.ts) per element, in a held flex column and a held scrolling grid, plus the unheld column.
dialog-focus.test.ts reads the example pages, finds each page's dialog and sl-drawer elements, opens each by its opener at 390px, and checks focus lands on the first control that edits or chooses, found through the flat tree, or else on a tabindex="-1" heading, never on Close. A last case pins that the pages hold both kinds, so an empty read can't pass. The Documents drawer failed: it holds a filter field but opened on its heading. sl-drawer gains initial-focus (initialFocus), the id of a child control the modal drawer focuses right after showModal(), falling back to the heading when no child has that id, and focusing nothing docked. Marking the slotted filter autofocus could not work: the dialog's autofocus search runs in flat-tree order and meets the shadow heading first, and autofocus in the page's markup takes focus on load while docked. The specimen's Documents drawer names its filter. themes.test.ts's drawer focus ring case now opens the modal Outline drawer, whose heading Tab leaves for the shadow Close, since Documents now opens on its light-DOM filter. STANDARDS.md's dialog-focus line says sl-drawer opens on its heading unless it names a slotted control to open on.
scripts/check/comments.sh fails on any comment line longer than 100 columns in the TS, JS, CSS,
shell, and TOML files git ls-files lists, naming the file and line and the fix; #MISE lines are
skipped. mise-tasks/check runs it after the format step, and .agent/mise-tasks/check/comments
wraps it.
- Bash and awk only, so Mikoshi can copy it. awk runs under LC_ALL=C and counts characters as
bytes less UTF-8 continuation bytes, the same on gawk and mawk.
- A comment is a full-line // or #, a trailing // or # after whitespace, or a line within a
/* */ block opened at a line's start or after whitespace, so URLs, globs like test/unit/*.ts,
and $# or ${#a} in shell aren't read as comments.
- Shell files without an extension count when their shebang names sh or bash, so the file tasks
are covered.
- test/unit/comments.test.ts runs the script in a scratch git repository against generated
fixtures; the fixtures can't be tracked files, since the step would fail on them.
- The five over-long comment lines found (examples/specimen.js, src/artifact-viewer.ts,
test/unit/release.ts) are rewrapped with their words unchanged.
…re its child sits The drawer's attribute-to-property test restated Lit's mapping; it now sets the property and checks the drawer opens on that child. The pagination's before-slot test read the slot's name and its wrapper's class; it now checks the slotted child sits between the summary and the page and stays put as the entries scroll.
The drawer's captures below the dock ran at 480x800; they now share the settings' narrow viewport, 390x844, still below the 48rem dock. The drawer's browser tests named 480px as NARROW; it is now 390px, and the edge-to-edge case takes NARROW with the suite's height. docs/components.md names the frameless-open capture at 390px.
The development pin moves to web-foundation's v0.5.0 tag (lockfile at 1fc1417, the tag's commit; the supply-chain policy passes) and the peer to ^0.5.0, a breaking change for a consumer on 0.4, recorded as such in the CHANGELOG. The example pages' Help and Settings dialogs (components, settings, shortcuts) hold sl-shortcuts and sl-settings in the foundation's .dialog-body; neither has an action row, so no .dialog-actions. The README's Settings and Help markup takes the same body, so a consumer copying it gets the column. The test fixtures' bare dialogs stay as they are: they test the elements, not the foundation's dialog layout. No example page or fixture uses body.page-app, so v0.5.0's held page and main scroll region change nothing here; the drawer's shadow dialog has no .dialog-body and keeps its own column. Nothing else needed changing: mise run currency exits 0 and the check passes, the dialog-focus test included.
package.json is 0.4.0. The CHANGELOG's Unreleased becomes [0.4.0] - 2026-12-01, with its [0.4.0] link line; README's install lines name web-components v0.4.0 and web-foundation v0.5.0. Not packed or tagged. Decisions: - No empty Unreleased stays above 0.4.0, as the 0.3.0 prep (0ac015a, cc605ef) left none. - A short paragraph above "### Added" says what breaks, as web-foundation's 0.4.0 and 0.5.0 do: the peer at ^0.5.0, the frameless lists scrolling inside a held host, and sl-pagination's --focus-reach inset. - README's dependency sentence names marked 18.4.0, the pin since 0.3.0, where it still said 18.2.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
capstone.data-intelligence.mikoshi · task 22/38 · web-regions
Summary
page-appis exactly the viewport's height, andmainis its one scroll region..fixed-rowskeeps a view's rows in place while its.scroll-frames scroll..dialog-bodyand.dialog-actionsgive a dialog a fixed header, a scrolling body, and afixed action row.
sl-pagination,sl-document-list, andsl-search-resultsscroll inside a held host.sl-drawergainsinitial-focus.go build.web-components pins it and its example dialogs adopt the column. After web-components v0.4.0 is
tagged, webappgen's starter takes both releases and adopts the column and
.fixed-rows.Core changes
.fixed-rowsfillsmainwhen it ismain's only child. Several frames share the remainingheight equally, so content arriving in one frame doesn't move another.
.scroll-frames doesn't scroll itself; each frame scrolls on its own.page controls stay in view. Unheld, each element is as tall as its content.
sl-drawer initial-focus="<id>": a modal drawer opens on the named child, such as afilter or the tree's current row. Otherwise it opens on its heading. A docked drawer never
takes focus.
scripts/check/comments.sh: a comment line over 100 columns fails aspath:line: comment is N columns; rewrap it to 100. It covers TS, JS, CSS, shell, and TOML.Verify
mise run check:mise run examplesin web-foundation and openapp.htmlat 390px and 1280px. Scroll theentry list. The document never scrolls, the list scrolls inside its frame, and "40 entries"
stays at the foot.
prose.htmlwith tall content. The document scrolls as before.dialogs.html, then "Edit the record". Focus is on Title, the fields scroll between thefixed header and the Cancel/Save row, and the dialog itself never scrolls. Open "Changes". Its
two lists scroll separately.
mise run examplesin web-components and opendocument-list.html. In devtools, givethe list
style.blockSize = "160px". The entries scroll, and the summary and page controlsstay put. Remove the size, and the list is as tall as its content.
drawer.htmlat 390px. Documents opens on its filter, and Outline opens on its heading.src/drawer.tsand runmise run check. It fails, namingsrc/drawer.ts:<line>.webappgen new service-app, runmise run dev. Only air runs, and anedit to
client/src/views/home.tsrebuilds the client and restarts the service.Screenshots for every profile, light and dark, at 390px and wide, are in
/tmp/claude-1000/-home-jaime-capstones-capstone-mikoshi/0b032d02-2918-43c9-9f2a-6d9d2e09fac9/scratchpad/screenshots/.The app page is
11-app-390px--*and12-app-wide--*, the dialogs are underlight/anddark/, and the components are3-pagination--*,10-search-results--*,11-document-list--*, plus acompact/folder.Decided without you
mainreserves its scrollbar gutter (scrollbar-gutter: stable), so a scrollbar appearingnever narrows the content. The content lines end one scrollbar width before
main's edge..fixed-rowsfillsmainonly as its only child, so a lede goes inside the rows and isn'tstretched.
flex-basis: 0), in a.fixed-rowsand in adialog body. A dialog whose body holds frames fills the modal's maximum height.
.dialog-actionsis a wrapping row at the inline end.sl-paginationgains abeforeslot, so the document list's status line stays out of thescrolling page.
--focus-reach, so a focused row's ring isn't clipped. Everythingsits about 4px further in.
at 390px/100%.
sl-drawer'sinitial-focusis an id, and the drawer focuses it right aftershowModal().The alternative,
autofocus, loses to the drawer's shadow heading in flat-tree order.shshebang as shell. A trailing//,#, or/*counts only after whitespace, so URLs, globs, and$#pass.scripts/dev.shasexec air, anddevno longer depends onclient:build. Air watches.go,.ts, and.css, and excludes the client'sdist/,node_modules/,test/, andscripts/.to 390px. A duplicate id in web-foundation's example dialog is fixed. Settings still focuses
its radio from its own code, as the dialog-focus page allows for a shadow-root control.
docs/use.md.scroll-frame…", now indocs/use.mdautofocus…",to stay within the Decisions budget. Its rule lives in architecture's
dialog-focus.mdand in web-components' new test, so only "Rejected: Close last in DOM order" is lost.
Redirects and escalations
sl-drawergains a property naming the slotted control to focus when the drawer opens as amodal.
Merge danger: one-way for the tags web-foundation
v0.5.0, web-componentsv0.4.0, andwebappgen
v0.4.0, which accepting authorizes. Everything else is two-way.slice 12, then webappgen, then capstone-mikoshi (the record). Each merge waits on CI.
Needs you: none. After SHIP, the closeout retro you asked for:
scroll-regionspagedialog-focus.mdforinitial-focus